using System;
using System.Collections;

namespace DiscGolfScore
{
	/// <summary>
	/// Value class for players.
	/// </summary>
	public class Player
	{
		public string FirstName;
		public string LastName;
		public int Id;
		public ArrayList holesPlaying = new ArrayList();

		public Player()
		{}

		public string ToXml() 
		{
			string xml = "<player firstname=\""+FirstName+"\" lastname=\""+LastName+"\" id=\""+Id+"\">\n";
			foreach( Hole h in holesPlaying ) 
			{
				xml += h.ToXml();
			}
			xml +="</player>\n";
			return xml;
		}

	}
}
